﻿<UserControl x:Class="Soat.HappyNet.Silverlight.Modules.Main.Views.MenuItemView"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:cal="clr-namespace:Microsoft.Practices.Composite.Presentation.Commands;assembly=Microsoft.Practices.Composite.Presentation"
    xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
    xmlns:action="clr-namespace:Soat.HappyNet.Silverlight.Library.Behaviors.Actions;assembly=Soat.HappyNet.Silverlight.Library">
    <Grid>
        <ToggleButton x:Name="MenuButton" 
                      Content="{Binding Name}"  
                      Style="{StaticResource MenuButtonStyle}"
                      cal:Click.Command="{Binding NavigateCommand}" 
                      IsChecked="{Binding IsCurrentMenuItem, Mode=TwoWay}">
            <i:Interaction.Triggers>
                <i:EventTrigger EventName="Click">
                    <action:TrackEventAction Category="Menu"
                                             Action="Navigation"
                                             Label="{Binding Name}"/>
                </i:EventTrigger>
            </i:Interaction.Triggers>
        </ToggleButton>
    </Grid>
</UserControl>
